package com.lagou.server;

public class LagouServlet extends HttpServlet {
    @Override
    public void init() throws Exception {

    }

    @Override
    public void destroy() throws Exception {

    }

    @Override
    public void doGet(Request request, Response response) throws Exception {
        String content = "<h1>LagouServlet Get</h1>";
        response.output(HttpProtocolUtil.getHttpHeader200(content.getBytes().length) + content);
    }

    @Override
    public void doPost(Request request, Response response) throws Exception {
        String content = "<h1>LagouServlet Post</h1>";
        response.output(HttpProtocolUtil.getHttpHeader200(content.getBytes().length) + content);

    }
}
